Memory controller configured to transmit interrupt signal if volatile memory has no data corresponding to address requested from source

ABSTRACT

According to one embodiment, a memory device includes a nonvolatile memory, a volatile memory, a controller, and a board. The nonvolatile memory stores data. The volatile memory holds a part of the data stored in the nonvolatile memory. The memory controller controls the volatile memory and the nonvolatile memory. The nonvolatile memory, the volatile memory, and the memory controller are provided on the board. The memory controller transmits an interrupt signal to a request source, when the volatile memory does not have any data corresponding to an address which the request source requests to access.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of application Ser. No. 16/023,458filed Jun. 29, 2018 which is a continuation of application Ser. No.14/808,431 filed Jul. 24, 2015 (now U.S. Pat. No. 10,042,786) and isbased upon and claims the benefit of priority from Japanese PatentApplication No. 2015-047251, filed Mar. 10, 2015, the entire contents ofwhich are incorporated herein by reference.

FIELD

Embodiments described herein relate generally to, for example, a memorydevice applied to a computer.

BACKGROUND

Recently, a dual in-line memory module (DIMM) which incorporates avolatile memory and a nonvolatile memory has been developed.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram schematically illustrating an exemplary memorydevice in one embodiment;

FIG. 2 is a plan view illustrating an exemplary mounting state of thememory device of the embodiment;

FIG. 3 is a block diagram schematically illustrating the composition ofa part of the memory device illustrated in FIG. 1 ;

FIG. 4 is a view illustrating an exemplary address;

FIG. 5 is a view illustrating an exemplary address management table;

FIG. 6 is a view illustrating address relations in the memory device;and

FIG. 7 is a sequence chart which illustrates how the memory deviceoperates.

DETAILED DESCRIPTION

In general, according to one embodiment, a memory device includes anonvolatile memory, a volatile memory, a controller, and a board. Thenonvolatile memory stores data. The volatile memory holds a part of thedata stored in the nonvolatile memory. The memory controller controlsthe volatile memory and the nonvolatile memory. The nonvolatile memory,the volatile memory, and the memory controller are provided on theboard. The memory controller transmits an interrupt signal to a requestsource, when the volatile memory does not have any data corresponding toan address which the request source requests to access.

Hereafter, an embodiment will be described with reference to thedrawings.

A typical computer has storage, including a main memory (DRAM) as avolatile memory, and a hard disk drive (HDD) or a solid-state drive(SSD) as a nonvolatile memory. The HDD or SSD is connected to a centralprocessing unit (CPU) bus using an interface such as a PeripheralComponent Interconnect Express (PCIe) interface, a Serial AdvancedTechnology Attachment (SATA) interface, etc. A program which the CPUexecutes needs to be held on the main memory. For this reason, thetransfer of program code from the storage through the CPU bus to themain memory should frequently occur, which affects the performance ofthe computer. Therefore, improvement in the performance of a computer isdesired.

FIG. 1 illustrates a memory device 11 in one embodiment. The memorydevice 11 is applied to a computer 21 as an information processing unit.The computer 21 includes a CPU 22, a north bridge 23 and a south bridge24, for example. The north bridge 23 and south bridge 24 each functionas an input/output interface of the CPU 22. The south bridge 24 is aninterface handling comparatively low-speed data, and a PCIe interface25, SATA interface 26, LAN 27, and USB 28 are connected to the southbridge 24, for example. Furthermore, a large-scale storage device, suchas an SSD 29 or an HDD 30, is connected to the PCIe interface 25 or SATAinterface 26, for example. The interface used for connection of the SSD29 is not limited to the PCIe interface 25. Connection by the SATAinterface 26 or a Serial Attached SCSI (SAS) interface, which is notillustrated in any of the drawings, is also possible. Moreover, theinterface used for connection of the HDD 30 is not limited to the SATAinterface 26. The connection using the PCIe interface 25 or SAS is alsopossible.

The north bridge 23 is an interface handling high-speed data. The memorydevice 11, a graphics board, which is not illustrated in any of thedrawings, and so forth are connected to the north bridge 23.

The north bridge 23 has a memory management unit (MMU) 23 a, forexample. MMU 23 a controls the memory device 11, SSD 29, and HDD 30 asvirtual memories, for example, under an operating system. Furthermore,when MMU 23 a receives a trap signal having been transmitted from thememory device 11 as an interrupt signal, MMU 23 a does not have accessto the SSD 29 or HDD 30, but notifies the CPU 22 of the reception of thetrap signal, as will be described later. Concrete operation of thememory device 11, SSD 29, or HDD 30 will be described later.

The memory device 11 of this embodiment is mounted on a DIMM, forexample. The memory device 11 includes a NAND flash memory (hereinafterreferred to as NAND) 13 as a nonvolatile memory, a DRAM 14 as a volatilememory, a memory controller 15 which controls the DRAM 14 and NAND 13,and pins 16 as connection terminals connected to the memory controller15.

A nonvolatile memory is not limited to the NAND 13, but amagneto-resistive RAM (MRAM) or a resistive RAM (ReRAM) may be used as anonvolatile memory. The NAND 13 holds data read from the SSD 29 or HDD30 as will be described later. The DRAM 14 holds a part of the data heldin the NAND 13. In other words, the data held in the NAND 13 ispartially copied to the DRAM 14. Accordingly, the DRAM 14 is smallerthan the NAND 13 in storage capacity. For example, when the NAND 13 is16 GB, the DRAM 14 may have a storage capacity of only 1 GB. However,how much storage capacity each memory has is not limited to the aboveexample but is variable.

The memory controller 15 comprises a memory management unit (MMU) 17, acontroller 18, and a direct-memory-access controller (DMAC) 19, forexample. MMU 17 accesses the DRAM 14 based on the physical addresssupplied from the CPU 22, which will be described later. However, whenthere is no corresponding data in the physical address of the DRAM 14indicated by the CPU 22, MMU 17 accesses the NAND 13 with the help ofthe controller 18 and DMAC 19. The data read from the NAND 13 by theDMAC 19 is transmitted through to the DRAM 14. The data transmitted tothe DRAM 14 is further transmitted to the CPU 22 by the memorycontroller 15. For this reason, the CPU 22 can treat the memory device11 as a DRAM which has a storage capacity of the NAND 13.

The DMAC 19 controls the direct-memory-access between the NAND 13 andDRAM 14 under the control of the controller 18.

The controller 18 controls the DMAC 19, etc., according to instructionsfrom MMU 17.

FIG. 2 illustrates an exemplary mounting state of the memory device 11.The NAND 13, DRAM 14, and memory controller 15 are provided on theprinted-circuit board (hereinafter referred to as a “board”) 12 of theDIMM. The memory controller 15 is connected to some of the pins 16provided on the board 12.

The memory device 11 is connected to the north bridge 23 when the pins16 are inserted into the slots (not shown) and electrically connected tothe north bridge 23.

The memory device 11 that is mounted on the DIMM has been described asan example of the present embodiment. However, the memory device 11 ofthis embodiment can be mounted not only on the DIMM but also can bemounted on any memory board other than the DIMM. Moreover, the memorydevice 11 of this embodiment does not need to be mounted on a boardexclusively used for a memory, but may be mounted on a board or asemiconductor substrate on which other circuit elements are alsomounted.

FIG. 3 illustrates an example of MMU 17. MMU 17 includes a commandanalysis part 17 a, an address management part 17 b, and an interruptmanagement part 17 c, for example. The command analysis part 17 aanalyzes any command supplied from the CPU 22, for example, and controlsthe reading or writing of data to or from the DRAM 14.

The address management part 17 b not only manages the addresses of theNAND 13 or DRAM 14, but also examines whether every data in the DRAM 14is valid or invalid. Furthermore, whenever any data in the DRAM 14 isrewritten, the address management part 17 b examines whether therewritten data are surely reflected in the NAND 13.

When the DRAM 14 does not have any data corresponding to an addresswhich the CPU 22 requests to access, the interrupt management part 17 cgenerates a trap signal as an interrupt signal, and sends the trapsignal to the CPU 22. Simultaneously, the interrupt management part 17 csends the trap signal to the controller 18, and requests the controller18 to cause the DMAC 19 to read data from the NAND 13 and to transmitthe data to the DRAM 14. Furthermore, when the data read from the NAND13 has been transmitted to the DRAM 14 by the DMAC 19, the interruptmanagement part 17 c generates a completion signal as an interruptsignal, and sends the completion signal to the CPU 22.

What the command analysis part 17 a, the address management part 17 b,and the interrupt management part 17 c do are not limited to theabove-mentioned respective functions but may be modified.

FIG. 4 illustrates an exemplary physical address supplied from the CPU22. Let us suppose here that, as described above, the storage capacityof the NAND 13 should be 16 GB and the storage capacity of the DRAM 14should be 1 GB. Moreover, let us suppose that the data held in the NAND13 should be partially held in the DRAM 14 and that the CPU 22 shouldrecognize the memory device 11 to be a 16-GB DRAM.

Under such an assumption, a 34-bit or more physical address is requiredin order to access the 16-GB memory device 11. For this reason, a 34-bitphysical address such as illustrated in FIG. 4 will be supplied by theCPU 22. For instance, 30 bits from the least significant bit of the34-bit address are assigned to be used as an address to access 1-GB DRAM14. When a cache line size is supposed to be 1 MB, the lower 20 bitswill be used as an address in a line, and the upper 10 bits will be usedas an entry address. Moreover, the top 4 bits of the 34-bit address areassigned to a tag which is used as information to have access to 16 GBof the NAND 13 in units of 1 GB.

FIG. 5 illustrates an exemplary address translation table ATT providedin the address management part 17 b. The address translation table ATThas entries ENT each specified by a 10-bit entry address. Each entry ENTcomprises a 4-bit tag, a dirty flag DF, and a valid flag VF.

A physical address is specified with a 10-bit entry address (hereinafterreferred to as YYY), and a 4-bit tag (hereinafter referred to as XXX).

For example, when address YYY of the DRAM 14 such as illustrated in FIG.6 is accessed, and when a physical address such as illustrated in FIG. 4is supplied from the CPU 22, then the tag of the entry specified byaddress YYY is XXX in the address translation table ATT illustrated inFIG. 5 . Accordingly, the address management part 17 b determines thatthe data occupying address YYY of the DRAM 14 is the correct data.

On the other hand, when the tag of the entry specified by address YYY isother than XXX (for example, XYX), the address management part 17 bdetermines that the data stored at address YYY of the DRAM 14corresponds to data at another address of the NAND 13.

The dirty flag DF is a flag that indicates whether the data that is inthe NAND 13 and corresponds to an address of a particular entry ENT isrewritten according to the latest data of the DRAM 14 when the data inthe DRAM 14 that corresponds to a particular entry ENT has beenrewritten.

When the dirty flag DF indicates “0”, a portion of data in the DRAM 14is written to the NAND 13, and the data in the DRAM 14 coincides withthe data in the NAND 13. When the dirty flag DF indicates “1”, a portionof data in the DRAM 14 is not written to the NAND 13, and the data inthe DRAM 14 does not coincide with the data in the NAND 13.

The valid flag VF indicates whether the data stored in the DRAM 14 isvalid. The data of the DRAM 14 is invalid when the valid flag VFindicates “0”. The data of the DRAM 14 is valid when the valid flag VFindicates “1”.

The configuration of MMU 17 and the configuration of the addresstranslation table ATT are not restricted to what are illustrated in FIG.3 to FIG. 5 , but can be changed.

In the above-mentioned configuration, the program code such as anoperating system, etc., stored in the SSD 29 or HDD 30 is transmittedwhen the computer 21 starts up to the memory device 11 through the PCIeinterface 25 or SATA interface 26, and through the south bridge 24 andthe north bridge 23. The memory controller 15 stores program code in theNAND 13 and part of the program code in the DRAM 14. Moreover, MMU 17included in the memory controller 15 updates the contents of the addresstranslation table ATT.

The memory device 11, SSD 29, and HDD 30 are controlled in operation bythe operating system of the computer 21, and the memory device 11 isrecognized to be a DRAM by the CPU 22.

(Operation)

The operation of the memory device 11 having the above-mentionedcomposition will be explained below with reference to FIG. 7 .

For example, when a data read request is issued from the CPU 22 to thememory device 11 (S11), the command analysis part 17 a of MMU 17analyzes a read command which is the read request. The addressmanagement part 17 b searches the address translation table ATT based ona physical address contained in the read command (S12). That is, asdescribed above, it is determined whether the physical address includedin the read command and any one of the addresses kept in the addresstranslation table ATT are coincident with each other (S13). When theresult indicates that they are coincident with each other, it is thendetermined whether the valid flag VF of the address as a subject ofcomparison is valid (S14). When the result of the determinationindicates valid, the data in the DRAM 14 is read and transmitted throughthe north bridge 23 to the CPU 22 (S24).

In contrast, when the determination result of S13 indicates that theaddresses are not coincident with each other, or when the determinationresult of S14 indicates that the valid flag is invalid, the interruptmanagement part 17 c outputs a trap signal as an interrupt signal (S15).The trap signal is supplied to the north bridge 23. Upon receipt of atrap signal, MMU 23 a of the north bridge 23 will generally have accessto the HDD 30 via the SATA interface or to the SSD 29 via the southbridge 24 and the PCIe interface 25. In contrast, when MMU 23 a in thisembodiment receives a trap signal, it does not have access to the SSD 29or HDD 30 but notifies the CPU 22 of the receipt of the trap signal.Based on the notification, the CPU 22 brings the task, which issues theread request, into a suspension state (idle state), for example, andperforms some other task.

After transmitting the trap signal, MMU 17 causes the DRAM 14 to make anempty (free) area and instructs the controller 18 to read data from theNAND 13 (S16). This data is none other than data that corresponds to theread request issued from the CPU 22. It is determined based on the dirtyflag DF that whether the data in the DRAM 14 should be written to theNAND 13 when the empty area is created in the DRAM 14, as will bedescribed later.

The controller 18 instructs the DMAC 19 to read data that is specifiedby the read request (S17). The DMAC 19 reads data corresponding to theread request, from the NAND 13 (S18), and transmits the data to the DRAM14 (S19).

When the above-mentioned operation is to be performed based on theinstructions of MMU 17 and when the applicable area in the DRAM 14 isnot empty, the controller 18 instructs the DMAC 19 to save some data inthe DRAM 14 to the NAND 13, and to make an empty area in the DRAM 14.Specifically, when the dirty flag DF of the address translation tableATT is “1”, for example, the data in DRAM 14 that corresponds to thisparticular dirty flag is written to the NAND 13, and thus an empty areais made in the DRAM 14. When the dirty flag DF is “0”, the area in theDRAM 14 that corresponds to this particular dirty flag is recognized tobe an empty area which can be overwritten. Then, the controller 18instructs the DMAC 19 to read the data corresponding to the readrequest, from the NAND 13, and to transmit the data to the empty area ofthe DRAM 14. It should be noted that how to generate an empty area isnot limited to the above method, but that various methods may beapplicable.

When the transmission of data from the NAND 13 to the DRAM 14 iscompleted, the notice of completion will be sent from the DMAC 19 to thecontroller 18, and the controller 18 will notify the completion oftransmission to the MMU 17 (S20). When the MMU 17 receives thenotification, it sets the valid flag VF to “1” in order to indicate thatthe area is valid and updates the tag to the value of the high orderbits of the address (S21). Then, when MMU 17 receives the notificationof completion, the interrupt management part 17 c will transmit acompletion signal to the CPU 22 (S22).

Upon receipt of the completion signal, the CPU 22 will make preparationsfor resuming the task which has been changed into a suspension state.Moreover, MMU 17 reads the data corresponding to the read request fromthe DRAM 14, and transmits it to the CPU 22 (S23).

It should be noted that the above-mentioned explanation is given to theoperation of reading data from the memory device 11 according to theread request from the CPU 22. It should be also noted that, when a datawrite request is issued from the CPU 22, an operation that is the sameas the above will be performed. Namely, in the case where a writecommand is issued from the CPU 22 as a write request, and the DRAM 14does not have any physical address that is attached to the writecommand, the memory controller 15 will transmit a trap signal to the CPU22 as an interrupt signal in the same way as the above. The CPU 22 whichreceives the trap signal brings the task which issues the write requestinto a suspension state, and performs some other task.

Subsequently, the data which should be written to an address istransmitted from the NAND 13 to the DRAM 14. Then, the memory controller15 writes the data to the address of the DRAM 14. When writing iscompleted, a completion signal will be transmitted from the memorycontroller 15 to the CPU 22, and the CPU 22 will resume execution of thetask which is in the suspension state. Moreover, the address managementpart 17 b of MMU 17 sets the dirty flag DF corresponding to the writetarget address in the address translation table ATT as “1”.

Furthermore, when neither the DRAM 14 nor the NAND 13 has an addresswhich is an object to be accessed according to a read request or a writerequest from the CPU 22, MMU 23 a of the north bridge 23 transmits apage fault to the CPU 22. MMU 23 a of the north bridge 23 havingtransmitted the page fault performs swap processing which replaces thedata of the memory device 11 with the data of the SSD 29 or HDD 30. Forthis reason, MMU 23 a instructs the south bridge 24 to read from the SSD29 or HDD 30 the data that corresponds to a read request or a writerequest. The south bridge 24 reads the data that corresponds to a readrequest or a write request, from the SSD 29 or HDD 30 through the PCIeinterface 25 or SATA interface 26, and transmits the data through thenorth bridge 23 to the NAND 13 of the memory device 11.

Furthermore, in the above-mentioned explanation, an interrupt signal, aninterrupt completion signal, and a trap signal are presented by way ofmere examples. These signals can be modified to signals which the memorysystem 11 can notify to the CPU 12 when an event is changed in thememory system 11. The event includes that mismatch of address isdetected in the memory system 11 and data transmission from the memorysystem 11 to the CPU 12 is completed, for example.

The embodiment is not limited to the DIMM and the embodiment can beapplied to a single in-line memory module (SIMM) or another memorymodule.

(Advantage)

According to the embodiment, the memory device 11 has the NAND 13 andDRAM 14 which stores a part of the data stored in the NAND 13.Furthermore, the memory device 11 is recognized by the CPU 22 as a DRAMwhich has a storage capacity of the NAND 13. Therefore, since it canconsider that the CPU 22 has a large-scale DRAM, the CPU 22 will beimproved in its performance.

Moreover, the memory device 11 comprises the NAND 13 and DRAM 14 whichstores a part of the data stored in the NAND 13. In the event that thereis no requested data in the DRAM 14 when a data read request or a datawrite request has been received from the CPU 22, the memory controller15 transmits a trap signal as an interrupt signal to the CPU 22, andreads the data that corresponds to the data read request or the datawrite request, from the NAND 13. Upon receipt of the trap signal, theCPU 22 is capable of bringing a task which has issued the data readrequest or the data write request into a suspension state, and iscapable of performing another task. Therefore, the CPU 22 does not needto wait for completion of the data read request or the data writerequest, which makes it possible to prevent reduction in performance ofthe CPU 22.

While certain embodiments have been described, these embodiments havebeen presented by way of example only, and are not intended to limit thescope of the inventions. Indeed, the novel embodiments described hereinmay be embodied in a variety of other forms; furthermore, variousomissions, substitutions and changes in the form of the embodimentsdescribed herein may be made without departing from the spirit of theinventions. The accompanying claims and their equivalents are intendedto cover such forms or modifications as would fall within the scope andspirit of the inventions.

What is claimed is:
 1. A memory system comprising: a nonvolatile memoryconfigured to store data; a volatile memory configured to store a partof the data stored in the nonvolatile memory, a capacity of the volatilememory being smaller than a capacity of the nonvolatile memory; and acontroller configured to: in response to receiving, from a requester, afirst request that includes an address, send, to the requester, firstinformation as to whether first data is not stored in the volatilememory, the first data corresponding to the address included in thefirst request.
 2. The memory system according to claim 1, wherein thecontroller is configured to: send the first information as an interruptsignal.
 3. The memory system according to claim 1, wherein thecontroller is further configured to: in response to receiving the firstrequest from the requester, in a case where the first data is stored inthe volatile memory, send, to the requester, the first data from thevolatile memory.
 4. The memory system according to claim 1, wherein thecontroller is further configured to: in response to receiving the firstrequest from the requester, in a case where the first data is not storedin the volatile memory, read the first data from the nonvolatile memory;and store the read first data into the volatile memory.
 5. The memorysystem according to claim 4, wherein the controller is furtherconfigured to: upon the first data being stored into the volatilememory, send, to the requester, second information indicating that thefirst data has been stored into the volatile memory.
 6. The memorysystem according to claim 5, wherein the controller is furtherconfigured to: after sending the second information to the requester,send, to the requester, the first data from the volatile memory.
 7. Thememory system according to claim 5, further comprising: a first pin anda second pin, the second pin being different from the first pin, whereinthe first information is sent to the requester through the first pin,and the second information is sent to the requester through the secondpin.
 8. The memory system according to claim 1, wherein the controlleris further configured to: allow the requester to recognize that thememory system has a capacity equal to the capacity of the nonvolatilememory.
 9. The memory system according to claim 1, further comprising: adual inline memory module (DIMM) board, wherein the nonvolatile memory,the volatile memory, and the controller are provided on the DIMM board.10. The memory system according to claim 1, wherein the volatile memorycomprises a dynamic random access memory (DRAM), and the nonvolatilememory comprises a flash memory.
 11. A memory system comprising: anonvolatile memory configured to store data; a volatile memoryconfigured to store a part of the data stored in the nonvolatile memory;and a controller configured to: in response to receiving, from arequester, a first request that includes an address, in a case wherefirst data is not stored in the volatile memory, the first datacorresponding to the address included in the first request, read thefirst data from the nonvolatile memory; store the read first data intothe volatile memory; and upon the first data being stored into thevolatile memory, send, to the requester, first information indicatingthat the first data has been stored into the volatile memory.
 12. Thememory system according to claim 11, wherein the controller is furtherconfigured to: after sending the first information to the requester,send, to the requester, the first data from the volatile memory.
 13. Thememory system according to claim 11, wherein the controller is furtherconfigured to: in response to receiving the first request from therequester, in a case where the first data is stored in the volatilememory, send, to the requester, the first data from the volatile memory.14. The memory system according to claim 11, wherein the controller isfurther configured to: before sending the first information to therequester after receiving the first request, send, to the requester,second information as to whether the first data is not stored in thevolatile memory.
 15. The memory system according to claim 14, whereinthe controller is configured to send the second information as aninterrupt signal.
 16. The memory system according to claim 14, furthercomprising: a first pin and a second pin, the second pin being differentfrom the first pin, wherein the first information is sent to therequester through the first pin, and the second information is sent tothe requester through the second pin.
 17. The memory system according toclaim 11, wherein a capacity of the volatile memory is smaller than acapacity of the nonvolatile memory, and the controller is furtherconfigured to: allow the requester to recognize that the memory systemhas a capacity equal to the capacity of the nonvolatile memory.
 18. Thememory system according to claim 11, further comprising: a dual inlinememory module (DIMM) board, wherein the nonvolatile memory, the volatilememory, and the controller are provided on the DIMM board.
 19. Thememory system according to claim 11, wherein the volatile memorycomprises a dynamic random access memory (DRAM), and the nonvolatilememory comprises a flash memory.
 20. The memory system according toclaim 11, wherein the requester is a central processing unit of aninformation processing device.